1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method capable of reducing false color that appears when using a 1CCD image pickup device, for example.
2. Description of Related Art
An image pickup apparatus that employs a 1CCD system with a single charge coupled device (CCD) as an image pickup device can only produce a spectral sensitivity with a reduced shade when it captures an image just as it is. In order to produce a color image, it is common to place a color filter having a prescribed pattern on a light receiving surface of a photoreceptor for each pixel and capture an image.
Because each pixel of an image obtained by such image capturing has a single color component only, the image is mosaic in color in accordance with the pattern of the color filter used. Thus, on each pixel of the mosaic image, other color components which the pixel does not have are interpolated, thereby creating a color image in which all pixels have all color components.
In a 3 CCD system, incident light is separated into three primary color light beams by a prism, and different light beams are detected by different CCDs. Because this system separate color information of an original object into three primary colors of R, G and B and allocates a CCD for each of them, it is necessary to use triple CCDs to obtain the same area of image and requires a complicated mechanism, thus being costly. This system still enables creation of a rapid high-resolution image with high color reproducibility.
In a 1CCD color camera, a color interpolation process that interpolates a missing color component based on prediction is required structurally. The color interpolation process creates data of a color that does not exist in a target pixel by estimation from the pixel values of pixels in the vicinity of the target pixel. Thus, in a portion where a pixel value sharply changes such as an edge portion, an accurate value cannot be calculated in many cases. As a result, a pixel having an inaccurate color balance can exist at an edge portion, which causes false color to appear, deteriorating image quality.
An image processing method that aims to easily and effectively reduce or eliminate false color that appears at an edge portion due to the color interpolation process is disclosed in Japanese Unexamined Patent Application Publication No. 2005-167974 (referred to hereinafter as a related art 1). The image processing method according to the related art 1 performs a color interpolation process on image data, converts the processed image data into a luminance signal and a color difference signal, and performs false color reduction process on the color difference signal. The false color reduction process selects N (N≧4) number of pixels, including a target pixel, that are arranged sequentially in a first direction by a one-dimensional filter and determines an average or intermediate value of the pixel values of the pixels selected by the one-dimensional filter excluding a maximum pixel value and a minimum pixel value to be a pixel value of the target pixel.
That is, it is assumed that the pixel value of a pixel that generates a false color has a higher degree of coloring than the pixel values of the peripheral pixels, and in order to eliminate the pixel having the higher rate (degree) of coloring, the maximum and minimum pixel values of the pixels including the target pixel that are arranged sequentially one-dimensionally are eliminated. Since it can be judged that the rate of coloring increases basically in proportion to the absolute value of the value of the color difference (C) signal, the pixel value can be determined based on the value of the color difference signal (C) that is obtained as a result of YC conversion of the image data after the color interpolation process into a luminance signal and a color difference signal.
Further, a 1CCD color camera that aims to remove transient noise that causes false color to appear is disclosed in Japanese Unexamined Patent Application Publication No. 60-254893 (referred to hereinafter as a related art 2). The 1CCD color camera according to the related art 2 detects an edge portion where a basic frequency sharply changes and eliminates the color difference signal at this edge portion, thereby preventing false coloring from occurring due to transient noise.
Because the interpolation process only considers the signal values of pixels adjacent to the target pixel, it fails to perform an appropriate interpolation process in a boundary (edge) where a signal value of a pixel greatly changes, causing that false color is likely to appear at the edge. As a result, false color is likely to appear in the boundary where a signal value of a pixel changes significantly, such as a boundary of vertically striped patterns or a boundary between a subject image and a background image.
However, the technique disclosed in the related art 1 performs the false color removal process on all pixels using an averaging filter or a median filter after conversion into a YUV signal in order to remove false color. In such a method, the false color removal process is performed unnecessarily on the area other than the edge portion, where false color is not likely to appear. Further, even if the filtering process is performed mainly on the edge portion, because the false color removal process is performed uniformly, a degree of false color removal cannot be adjusted, and the false color removal can fail depending on a pixel.
Further, the technique disclosed in the related art 2 performs false color removal process that masks the modulation in accordance with an absolute value of a color difference signal and determines whether to eliminate a color difference signal or not. In such a method, there is a possibility to eliminate the color difference signal in a portion where false color does not appear, which causes an unnatural image to be created.